/**
 Copyright (C) 2013 Yuyao Liang

 This source code is release under the BSD License.

 This program is distributed in the hope that it will be useful, but WITHOUT
 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 FOR A PARTICULAR PURPOSE.  See the license for more details.

 Created on Oct 25, 2013 10:52:08 AM
 */
package com.googlecode.backtest.model;

import com.googlecode.backtest.dataset.IBackTestStockDataset;
import com.googlecode.backtest.rule.IAlgorithm;
import com.googlecode.backtest.rule.ITAParameters;

/**
 * @author lianyuy
 * 
 */
public class StockBackTestModel
		extends
		BackTestModel<IBackTestStockDataset, IAlgorithm<IBackTestStockDataset, ITAParameters>> {

	private final String ID = getClass().getName();
	private final String VERSION = Messages
			.getString("StockBackTestModel.VERSION"); //$NON-NLS-1$

	@Override
	public String getID() {
		return ID;
	}

	@Override
	public String getVersion() {
		return VERSION;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.googlecode.backtest.model.IBackTestModel#setTestData(T[])
	 */
	@Override
	public void setTestData(IBackTestStockDataset[] dataset) {
		this.dataset = dataset;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.googlecode.backtest.model.IBackTestModel#getTestResult()
	 */
	@Override
	public IBackTestStockDataset getTestResult() {
		return result;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.googlecode.backtest.model.IBackTestModel#addAlgorithm(java.lang.Object
	 * )
	 */
	@Override
	public void addAlgorithm(IAlgorithm algorithm) {
		algorithmnList.add(algorithm);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.googlecode.backtest.model.IBackTestModel#removeAlgorithm(java.lang
	 * .Object)
	 */
	@Override
	public void removeAlgorithm(IAlgorithm algorithm) {
		algorithmnList.remove(algorithm);
	}

}
